<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
	</body>
	<script type="text/javascript">
//		1.创建对象
		var xhr = new XMLHttpRequest();

//		2.绑定监听事件,监听状体
		xhr.onreadystatechange = function(){
			if(xhr.readyState==4){
				var data = JSON.parse(xhr.responseText)
				console.log(data)
			}
			
		}
		//		3.建立链接
		xhr.open("GET","http://127.0.0.1:8081/home/swiper");
//		4.发送请求
		xhr.send() 
		

	</script>
</html>
